﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using ABCTile.Models;
using ABCTile.DAL;

namespace ABCTile.Models
{
    public class Contract
    {
        [Key]
        public int ProjectID { get; set; }
        [Required(ErrorMessage = "Customer ID is required")]
        [Display(Name = "Customer ID")]
        public int customerID { get; set; }
        [Required(ErrorMessage = "Owner ID is required")]
        [Display(Name = "Owner ID")]
        public int ownerID { get; set; }
        [Required(ErrorMessage = "Special Section is required")]
        [Display(Name = "Special Section")]
        [Range(0, 99999)]
        public int spec_section { get; set; }
        [Required(ErrorMessage = "Agreement number is required")]
        [Display(Name = "Agreement number")]
        [Range(0, 99999)]
        public int agreement_number { get; set; }
        [Required]
        public DateTime agreement_date { get; set; }
        [Required(ErrorMessage = "Job Number is required")]
        [Display(Name = "Customer Job number")]
        [Range(0, 99999)]
        public int customer_job_number { get; set; }
        [Required(ErrorMessage = "Contract number is required")]
        [Display(Name = "Primary contract number")]
        [Range(0, 9999999999)]
        public int prime_contract_number { get; set; }
        [Required(ErrorMessage = "Amount is requried")]
        [Display(Name = "Contract amount in US Dollars")]
        [Range(1, 999999999)]
        public int contract_amount { get; set; }
        [Required]
        public DateTime job_start_date { get; set; }
        [Required]
        public DateTime job_end_date { get; set; }
        [Required(ErrorMessage = "Division ID is required")]
        [Display(Name = "Division ID")]
        [Range(0, 99999)]
        public int division_id { get; set; }
        [Display(Name = "Comment on the Contract")]
        [MaxLength(200, ErrorMessage = "Comment cannot be longer than 200 Characters")]
        public string comment { get; set; }

        public int StatusID { get; set; }

        public virtual Status Status { get; set; }
    }
}